Note: This tutorial assumes that you have completed the previous tutorials: rc_visard/Tutorials/Setting up the ItemPick and BoxPick modules.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Computing grasps with ItemPick and BoxPick

Description: This tutorial shows how to use the compute grasps rosservice call of the ItemPick and BoxPick modules.

Keywords: rc_visard, itempick, boxpick, rosservice, Web GUI

Tutorial Level: BEGINNER

Goal

This tutorial shows how define load carriers and regions of interest through the rc_visard's Web GUI and then use the defined load carrier to compute grasps for bin picking applications with the ItemPick and BoxPick modules in ROS.

Before we start

Make sure you have the rc_itempick_client_node or the rc_boxpick_client_node running and connected to your rc_visard. For the installation and setup see the previous tutorial.

Defining a 3D region of interest

New 3D regions of interest can be configured in the Web GUI's Database ‣ Regions of Interest page, by clicking on "+Add a new 3D Region of Interest", as shown in the picture below.

Screenshot of the Web GUI showing how to define a 3D Region of Interest called '''tutorial_roi'''

It is always recommend to use Regions of Interest to limit the workspace and reduce the detection runtime.

Defining a load carrier

New load carriers can be configured in the Web GUI's Database ‣ Load Carriers page, by clicking on "+Add a new Load Carrier", as shown in the picture below.

Screenshot of the Web GUI showing how to define a load carrier called '''tutorial_carrier'''

Detecting the load carrier

After the load carrier has been configured, it can be detected using the LoadCarrier module. The Web GUI’s Modules ‣ LoadCarrier page offers a Try Out section for this purpose. One simply needs to specify the respective load carrier ID and hit the Detect Load Carrier button.

Computing grasps inside a load carrier

Once the load carrier is configured and detectable in the scene, the ROS client nodes of ItemPick and BoxPick can be used to compute grasps only for objects that are inside the bin. To this purpose, the additional argument load_carrier_id is added to the compute grasp service call. To compute grasps using ROS and the previously defined load carrier and region of interest, the actual rosservice call (omitting all non-required fields) looks like this:

  • For the ItemPick module:

    $ rosservice call /rc_itempick/compute_grasps "pose_frame: 'camera'
    region_of_interest_id: 'tutorial_roi'
    load_carrier_id: 'tutorial_carrier'
    suction_surface_length: 0.02
    suction_surface_width: 0.02"
  • For the BoxPick module:

    $ rosservice call /rc_boxpick/compute_grasps "pose_frame: 'camera'
    region_of_interest_id: 'tutorial_roi'
    load_carrier_id: 'tutorial_carrier'
    item_models:
    - type: 'RECTANGLE'
      rectangle:
        min_dimensions: {x: 0.05, y: 0.05}
        max_dimensions: {x: 0.1, y: 0.15}
    suction_surface_length: 0.02
    suction_surface_width: 0.02"

This service returns a list of computed suction grasps. Their coordinates are specified in the given pose_frame, i.e., here in "camera". The maximum value of returned grasps is 5 by default. This value can be adjusted in the WebGUI and via dynamic reconfigure in the ROS node.

The rc_boxpick_client_node requires the minimum and maximum dimensions of the rectangle to detect to be set. This node has also the possibility to detect rectangles only with the detect_items service:

  • $ rosservice call /rc_boxpick/detect_items "pose_frame: 'camera'
    region_of_interest_id: 'tutorial_roi'
    load_carrier_id: 'tutorial_carrier'
    item_models:
    - type: 'RECTANGLE'
      rectangle:
        min_dimensions: {x: 0.05, y: 0.05}
        max_dimensions: {x: 0.1, y: 0.15}"

Troubleshooting and FAQ

For troubleshooting purposes look here

Wiki: rc_visard/Tutorials/Computing grasps (last edited 2022-02-08 16:19:05 by ElenaGambaro)